package net;

/**
 * Contains basic server information.
 * @author Jason
 *
 */
public class ServerInfo {

	public final String ip;
	public final int port;
	
	public ServerInfo(String ip, int port){
		this.ip = ip;
		this.port = port;
	}
	
	public boolean equals(Object o){
		if(o instanceof ServerInfo == false)
			return false;
		ServerInfo info = (ServerInfo)o;
		return (ip.equals(info.ip) && port == info.port);
	}
	
	public int hashCode(){
		return ip.hashCode() + port;
	}
	
}
